package com.example.demo.mapper;

import com.example.demo.bean.CmsArticle;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface CmsArticleMapper {
    int deleteByPrimaryKey(String id);

    int insert(CmsArticle record);

    CmsArticle selectByPrimaryKey(String id);

    List<CmsArticle> selectAll();

    int updateByPrimaryKey(CmsArticle record);
    
    List<CmsArticle> allArticleWithParent();
    
    //查找和指定栏目相关联的文章个数
    int selectAtricleCountByCategryId(String categoryId);
    
    List<CmsArticle> selectBy(Date begin,Date end,String key);

    int updateStateById(String artId,String state);
}


